package com.learning.platform.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

public class QnAPostRequest {
    @NotNull(message = "课程ID不能为空")
    private Long courseId;

    @NotBlank(message = "标题不能为空")
    @Size(min = 5, max = 200, message = "标题长度应在5-200个字符之间")
    private String title;

    @NotBlank(message = "内容不能为空")
    @Size(min = 10, max = 5000, message = "内容长度应在10-5000个字符之间")
    private String content;

    // Constructors
    public QnAPostRequest() {}

    // Getters and Setters
    public Long getCourseId() {
        return courseId;
    }

    public void setCourseId(Long courseId) {
        this.courseId = courseId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }
}

